{template header}
<link rel="stylesheet" href="static/calendar/js/calendar.css" />
<script type="text/javascript" charset="utf-8" src="static/calendar/calendar.php"></script>
<h4 style="padding-left:10px;;">
    <span>搜索</span>
    <i class="icon-search"></i>
</h4>
<form class="form-horizontal" method="post" action="">
    <div class="control-group search-group">
        <label class="control-label" >话题名称：</label>
        <div class="controls">
          <input type="text" placeholder="话题名称" name="name" value="{$search['name']}">
        </div>
    </div>
    <div class="control-group search-group">
        <label class="control-label" >创建开始时间：</label>
        <div class="controls">
            <input type="text" name="addtimeStartStr" id="date_time_id" value="{$search['addtimeStartStr']}">　
            <button name="date_time_btn" type="button" id="date_time_btn" onclick="return showCalendar('date_time_id', '%Y-%m-%d', '24', false, 'date_time_btn');" class="button" id="date_time_id"/>选择</button>
        </div>
    </div>
    <div class="control-group search-group">
        <label class="control-label" >创建结束时间：</label>
        <div class="controls">
            <input type="text" name="addtimeEndStr" id="date_time_id2" value="{$search['addtimeEndStr']}">　
            <button name="date_time_btn2" type="button" id="date_time_btn2" onclick="return showCalendar('date_time_id2', '%Y-%m-%d', '24', false, 'date_time_btn2');" class="button" id="date_time_id2"/>选择</button>
        </div>
    </div>
    <!--
    <div class="control-group search-group">
        <label class="control-label" >最新内容开始时间：</label>
        <div class="controls">
            <input type="text" name="startTimeStr" id="date_time_id3" value="{$search['startTimeStr']}">　
            <button name="date_time_btn3" type="button" id="date_time_btn3" onclick="return showCalendar('date_time_id3', '%Y-%m-%d', '24', false, 'date_time_btn3');" class="button" id="date_time_id3"/>选择</button>
        </div>
    </div>
    <div class="control-group search-group">
        <label class="control-label" >最新内容结束时间：</label>
        <div class="controls">
            <input type="text" name="endTimeStr" id="date_time_id4" value="{$search['endTimeStr']}">　
            <button name="date_time_btn4" type="button" id="date_time_btn4" onclick="return showCalendar('date_time_id4', '%Y-%m-%d', '24', false, 'date_time_btn4');" class="button" id="date_time_id4"/>选择</button>
        </div>
    </div>
    -->
    <div class="control-group search-group">
        <div class="controls">
            <input type="hidden" value="search" name="s">
            <button class="btn" type="submit">提交</button>　
            <button class="btn" type="reset">重置</button>
            <a class="btn" href="?c=admin&a=featuredTopic">话题配置</a>
        </div>
    </div>
</form>
<div class="bs-docs-example" style="clear:both; padding-top: 30px;">
    <table class="table table-striped">
        <thead>
            <tr >
                <th>ID</th>
                <th>名称</th>
                <th>状态</th>
                <th>最新内容时间</th>
                <th>帖子数<a href="?c=admin&a=topicList&sort=post_count_asc">升</a><a href="?c=admin&a=topicList&sort=post_count_desc">降</a></th>
                <th>查看数<a href="?c=admin&a=topicList&sort=pv_asc">升</a><a href="?c=admin&a=topicList&sort=pv_desc">降</a></th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {loop $topicList $k $v}
            <tr>
                <td>{$v['topic_id']}</td>
                <td>{$v['name']}</td>
                <td>{eval echo $topicStatus[$v['status']]}</td>
                <td>{eval echo date('Y-m-d H:i',$v['last_time'])}</td>
                <td>{$v['post_count']}</td>
                <td>{$v['pv']}</td>
                <td>
                    <a href="?c=admin&a=topicInfo&topic_id={$v['topic_id']}">编辑</a>
                    <a href="?c=admin&a=topicAction&action=delete&topic_id={$v['topic_id']}">隐藏</a>
                </td>
            </tr>
            {/loop}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
{template footer}
